﻿#include "../MeasureCircle2PSA.h"
#include "../MeasureDataSet.h"
#include "../MeasureCircle2P.h"

namespace Qly {
MeasureCircle2PSA::MeasureCircle2PSA(MeasureDataSet *parent)
    :MeasureCircle2P(parent)
{
    m_measureType = Circle2P_SA;
}

int MeasureCircle2PSA::adjust(QPointF p1, QPointF p2)
{
    double ps = m_pParent->m_pixSize_um;
    m_keyPoints_pix[0] = p1;
    m_keyPoints_pix[1] = p2;
    m_keyPoints_um[0] = p1 * ps;
    m_keyPoints_um[1] = p2 * ps;
    compute();
    updateText();
    m_measureState = DS_FINISH;
    return m_measureState;
}

}

